using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Db4objects.Db4o;
using MonitorTemperatura.Entidades;
using MonitorTemperatura.DataAccess;

namespace MonitorTemperatura.Operciones
{
    public class Comun
    {
        public Comun()
        { }

        public  void DeleteAll()
        {
            ComunDAO dao = new ComunDAO();
            dao.DeleteAll();
        }

        private void startServer()
        {
           StartServer  server = new StartServer();
            server.RunServer();
        }
        public void stopServer()
        {
            StopServer.Stop();
        }

        public delegate void MethodDelegate();

        public void AsyncStartServer()
        {
            MethodDelegate dlgt = startServer;
            IAsyncResult ar = dlgt.BeginInvoke(null,null);
        }

        public bool Serverestatus()
        {
            return DBServerEstatus.Estatus();
            
        }
    }
}
